//////////////////////////////////////////////////////////////////////////////////
//	Copyright 2011 by Yosef Grabivker, ryuho@homenetworksoft.com
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
//////////////////////////////////////////////////////////////////////////////////

#ifndef _PROPDLG_YG_H__
#define _PROPDLG_YG_H__

#include "def.h"
#include <list>
#include <wx/propdlg.h>

class CPropertyDlg: public wxPropertySheetDialog
{
public:
								CPropertyDlg(class CPropertyStorage& propStorage);
	virtual						~CPropertyDlg(void);
	bool						Create (PANELTYPE plCur, wxWindow *parent=NULL, wxWindowID id=wxID_ANY, const wxString &title=_("Options"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCLOSE_BOX|wxCAPTION|wxPROPSHEET_NOTEBOOK, const wxString &name=wxDialogNameStr);
	
	void						Save(bool& bRestart);
	

	DECLARE_EVENT_TABLE()
protected:
	void						OnHelp(wxHelpEvent& event);
	void						OnHelpButton(wxCommandEvent& event);
	
private:
	void						FillPage( class wxPanel* pPage, PANELTYPE type, bool bHaveDigradeProtection=false);
	void						LoadGeneralPageData();
	void						LoadSysLogPageData();
	void						LoadNotifyPageData();
	void						LoadSchedulerPageData();
	void						LoadLogPageData();
	void						LoadPortForwardPageData();
	
private:
	class wxImageList*			m_imageList;
	class CPropertyStorage&		m_propStorage;
	
	typedef struct tagUIDATA
	{
		PANELTYPE 				type;
		class CLevelChooser* 	pLevel;
		class CReactionChooser*	pReaction;
		class wxCheckBox*		pEnableLeaksProtection;
	}UIDATA;
	
	typedef std::list<UIDATA> 	UIDATALIST;
	UIDATALIST 					m_uiData;

	class CGeneralOptions*		m_pGeneral;
	class CSysLogOptions*		m_pSysLog;
	class CNotifyOptions*		m_pNotify;
	class CSchedulerOptions*	m_pScheduler;
	class CLogOptions*			m_pLogOptions;
	class CPortForwardOptions*	m_pPFOptions;
};

#endif //_PROPDLG_YG_H__
